﻿using Inovout.Locations;
using Inovout.Models;
using System.ComponentModel.DataAnnotations;

namespace Inovout.Organizations.Models
{
    partial class OrganizationUnit : DataObject
    {
        private string name;
        [Required(ErrorMessage = "机构名称不可为空")]
        [Alias("机构名称")]
        public virtual string Name
        {
            get { return name; }
            set
            {
                this.name = value;
                QuanPinName = ConvertToQuanPin(Name);
                JianPinName = ConvertToJianPin(Name);

            }
        }
        public virtual string QuanPinName
        {
            get;
            set;
        }
        public virtual string JianPinName
        {
            get;
            set;
        }
        public virtual Location Location { get; set; }
    }
}
